﻿namespace MagicWorld.OOP.Model
{
    public abstract class Player
    {
        public Player(Weapon weapon)
        {
            Weapon = weapon;
        }

        /// <summary>
        /// 武器
        /// </summary>
        public Weapon Weapon { get; set; }

        /// <summary>
        /// 攻击
        /// </summary>
        /// <param name="monster"></param>
        public void Attack(Monster monster)
        {
            monster.ReceiveDamageBy(Weapon, this);
        }
    }

    /// <summary>
    /// 战士
    /// </summary>
    public class Fighter : Player
    {
        public Fighter(Weapon weapon) : base(weapon)
        {
        }

    }

    /// <summary>
    /// 法师
    /// </summary>
    public class Mage : Player
    {
        public Mage(Weapon weapon) : base(weapon)
        {
        }
    }

    /// <summary>
    /// 龙骑士
    /// </summary>
    public class DragonKnight : Player
    {
        public DragonKnight(Weapon weapon) : base(weapon)
        {
        }
    }
}